<template>
  <div class="head">
      <ul>
          <li @click="flag=!flag">搜索</li>
          <li class="on">推荐</li>
          <li>直播</li>
      </ul>
      <div class="search" v-show="flag">
          搜索页面
      </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            flag:false,
        }
    }
}
</script>

<style>
    *{
        margin: 0;
        padding: 0;
        list-style: none;
        box-sizing: border-box;
    }
    .head{
        width: 100%;
        height: 50px;
        position: relative;
    }
    .head>ul{
          display: flex;
            justify-content: space-around;
            align-items: center;
    }
    .head>ul>li{
        flex: 1;
        line-height: 50px;
        text-align: center;
    }
    .on{
        font-size: 18px;
        font-weight: 600;
    }
    .search{
        position: absolute;
        top: 50px;left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        background: white;
    }
</style>